package ren.kane.phoenix.design.abstractfactory;

/**
 * @author renrk(1275) on 2018-10-07 6:52 PM
 **/
public class AbstractFactoryPatternDemo {

    public static void main(String[] args) {
        AbstractFactory shapeFactory = FactoryProducer.getFactory("shape");

        Shape shape = shapeFactory.getShape("circle");
        shape.draw();

        AbstractFactory colorFactory = FactoryProducer.getFactory("color");

        Color color = colorFactory.getColor("red");
        color.fill();
    }
}
